Silicate dust grains in the interstellar medium are known to be mostly amorphous, yet crystalline silicate grains have been observed in many long-period comets and in protoplanetary disks. Annealing of amorphous silicate grains into crystalline grains requires temperatures greater than or approximately equal to 1000 K, but exposure of dust grains in comets to such high temperatures is apparently incompatible with the generally low temperatures experienced by comets. This has led to the proposal of models in which dust grains were thermally processed near the protoSun, then underwent considerable radial transport until they reached the gas giant planet region where the long-period comets originated. We hypothesize instead that silicate dust grains were annealed in situ, by shock waves triggered by gravitational instabilities. We assume a shock speed of 5 km/s, a plausible value for shocks driven by gravitational instabilities. We calculate the peak temperatures of pyroxene grains under conditions typical in protoplanetary disks at 5-10 AU. We show that in situ annealing of micron-sized dust grains can occur, obviating the need for large-scale radial transport.